home *** CD-ROM | disk | FTP | other *** search
/ Modeling the Dream / Modeling the Dream CD - Walkthroughs and Flybys II (1994)(Waite Group).iso / spacebar / kohtz.txt < prev    next >
Text File  |  1994-08-23  |  8KB  |  432 lines

  1. set maxcall on
  2. set swappath "c:\temp"
  3. init
  4. localise
  5. kohtz
  6. terminate
  7.  
  8.  
  9. init:
  10. video l
  11. global cr chr(10)$chr(13)               
  12. global ext ""
  13. local trip 1            ;does the sound play?, set to false
  14. . chdir(@c$"\\bigdemo")
  15. opengl @c$"\bigdemo\bigdemo.ovr"
  16. load midpak
  17. @midpak verify
  18. closegl
  19. if !@0
  20.  text "The MIDPAK.COM driver is not loaded!"$@cr
  21.  text "Press any key to return to DOS."
  22.  wait
  23.  exit
  24. endif
  25.  
  26. if !envdef(c)
  27.  text "No C environment variable! "@cr
  28.  text "To run BIGDEMO from DOS use GO.BAT"@cr
  29.  wait
  30.  exit
  31. endif
  32.  
  33. when ESC goto terminate 
  34.  
  35. set fs open(@t$"\mtd\midpak.adv")    ;How big is MIDPAK.ADV
  36. local advsize size(@fs)            ;stick it in ADVSIZE
  37. . close(@fs)
  38.  
  39. databegin                ;sizes of the wave drivers
  40. "44836"
  41. "10590" 
  42. "10816"
  43. "10590"
  44. "7178"
  45. "10590 "
  46. "39859"
  47. "end"
  48. dataend
  49.  
  50. local x @                ;grab first item into var
  51. advhop:
  52. if @x!="end"
  53.  if @x==@advsize
  54.   text "Using wave table synthesis for MIDI"@cr
  55.   set ext ".gen"
  56.   goto advdone
  57.  else
  58.   local x @
  59.   goto advhop
  60.  endif
  61. endif
  62. text "Using frequency modulation (FM) MIDI files"@cr
  63. set ext ".opl"
  64. advdone:
  65.  
  66. opengl @c$"\bigdemo\bigdemo.ovr"
  67. load midpak.grp digpak.grp               ;load grps
  68. closegl
  69. if !@0
  70.  text "Error loading GRP files"
  71.  wait
  72.  exit
  73. else
  74.  text "GRPs loaded..."$@cr
  75. endif
  76.  
  77. . chdir(@c$"\\bigdemo")
  78. load "_laser.raw"
  79. digpak preloaded @_laser
  80. digpak play 
  81.  
  82. tt:
  83. digpak done
  84. if !@0
  85.  set trip 0
  86.  goto tt
  87. endif
  88. free laser
  89.  
  90. if @trip
  91.  text "Sound didn't play!!!!"@cr
  92.  wait 
  93.  exit
  94. else
  95.  text "Sound appears to be playing correctly"@cr
  96. endif
  97. midpak volume 100                      ;MIDPAK driver has internal vol control
  98.                     ;mixer levels for MIDI!!!
  99. text "Press Enter to start now"@cr@cr@cr
  100. text "At runtime pressing Enter will advance"@cr@cr@cr
  101. text "Press Esc at anytime to terminate"@cr@cr@cr
  102. text "Pausing for 10 seconds"
  103.  
  104. flushkey
  105.  
  106. mark 10
  107.  wait 100
  108.  text "."
  109.  waitkey 0
  110.  getkey k name                       
  111.  if @k==return
  112.   return
  113.  endif
  114. loop
  115. return                    ;--------------- end of init
  116.  
  117.  
  118. localise:                ;subroutine checks for flics on hd
  119.                     ;and copies them if possible.
  120. local ax 0 bx 0 cx 0 freebytes 0 chcnt 0 chfile " " downed 0
  121. local runcd 0
  122. . chdir(@t$"\\mtdtemp")
  123. global fromcd 0
  124. int 0x21 0x3600,,,0x0000        ;default drive
  125. if @ax==0xffff
  126.  text "Problem getting free disk space"
  127.  pause
  128.  exitnow
  129. endif
  130. set freebytes (@ax*@bx*@cx)/1000
  131. if @freebytes>=60000
  132.  set enuf 0
  133. else 
  134.  set enuf 1
  135. endif
  136.  
  137. color 0
  138. clearscr
  139. color 15
  140. window
  141.  
  142. databegin ckl
  143. loctop:
  144.  . chdir(@t$"\\mtdtemp")
  145.  set chfile @
  146.  if @chfile<>"end"
  147.   local temp open(@chfile)                               
  148.   if @temp                  
  149.    local success close(@temp)   
  150.   else
  151. ;   text @chfile$": file not found"$@cr
  152.    set downed 1
  153.   endif                     
  154. goto loctop
  155.  endif
  156.  . chdir(@t$"\\mtd")
  157. if @downed==0
  158.  text 0 0 "The requisite files have been found in MTDTEMP"
  159.  waitkey 100
  160.  set fromcd 1
  161.  global drive @t
  162.  return
  163. endif
  164. if @downed==1&&@enuf==0
  165.  databegin
  166.  "You have more than 60MB free on this drive! 
  167.  
  168.  
  169. Press C if you would like to run from the CD, or
  170.  
  171.  
  172. Press D to download the graphics to your hard disk for faster playback.
  173.  
  174.  
  175. Please press either C or D now:"
  176.  dataend
  177.  window
  178.  color 0
  179.  clearscr
  180.  color 15
  181.  text @
  182.  flushkey
  183.  waitkey
  184.  getkey k
  185.  if @k=="d"||"D"
  186.   set fromcd 1
  187.   global drive @t
  188.   download        ;go get the files...
  189.   return
  190.  endif  
  191.  if @k=="c"||"C"
  192.   global drive @c
  193. . chdir(@drive$"\\bigdemo")
  194.   return        ;play as per normal
  195.  endif
  196. endif
  197. if @enuf==1&&@downed==1
  198.   global drive @c
  199. . chdir(@drive$"\\bigdemo")
  200.   return        ;play as per normal
  201. endif
  202. return
  203.  
  204. runmode:
  205. if @fromcd==1
  206.  set thispath "\\mtdtemp\\"
  207. endif
  208. return
  209.  
  210. mp:
  211. midpak volume 90
  212. midpak use @c$"\\bigdemo\\"$@1$@ext
  213. midpak play
  214. return
  215.  
  216. playit:
  217. dload @1 d1 1 
  218. putdff d1 0 0 0 
  219. mark (d1->frames)-1
  220.  putdff d1 @playspeed @loop @loop
  221.  waitkey 0
  222.  getkey k name
  223.  if @k==return
  224.   set broken 1 
  225.   break playout
  226.  endif
  227. loop
  228. playout:
  229. dfree d1
  230. return
  231.  
  232.  
  233. terminate:
  234.  when esc
  235.  digpak quit                 ;implicit loading
  236.  midpak stop
  237.  free digpak midpak
  238. . chdir(@c$"\\spacebar")
  239.  exit
  240.  
  241.  
  242.  
  243.  
  244. download:
  245. video m
  246. color 0
  247. window
  248. clearscr
  249. color 15
  250. exec c:\dos\xcopy.exe @c$"\\flics\\kohtz\*.fli "$@t$"\\mtdtemp"
  251. video l
  252. return
  253.  
  254. ckl:
  255. CAM01A.FLI
  256. CAM01B.FLI
  257. CAM02.FLI
  258. CAM03.FLI
  259. CAM04.FLI
  260. CAM05.FLI
  261. CAM06.FLI
  262. CAM07.FLI
  263. CAM08A.FLI
  264. CAM08B.FLI
  265. end
  266.  
  267.  
  268.  
  269.  
  270. kohtz:                                 ;----- start of birdy
  271. local t ""
  272. set playspeed 3
  273. global thispath @c$"\\flics\\kohtz\\"
  274. runmode                ;check in from CD or hard disk
  275. mp camkohtz
  276. databegin
  277. _BUMP.raw
  278. _CUC.raw
  279. _DOOR.raw 
  280. _EYES.raw 
  281. _WINK.raw 
  282. _CHAIN.raw 
  283. _C2.raw  
  284. dataend
  285. mark 7
  286.  load @c$"\\bigdemo\\"$@
  287. loop
  288.  
  289. dload @thispath$"cam01a.fli" d1 1 
  290. putdff d1 0 0 0 
  291. mark (d1->frames)-1
  292.  putdff d1 @playspeed @loop @loop
  293.  if @loop==465                ;Reached frame 465
  294.   digpak preloaded @_door
  295.   digpak play 
  296.  endif
  297.  waitkey 0
  298.  getkey k name                       
  299.  if @k==return
  300.    set broken 1
  301.    break kohtzout
  302.  endif
  303. loop
  304. dfree d1
  305.  
  306. digpak preloaded @_cuc 
  307. digpak play 
  308.  
  309. playit @thispath$"cam01b.fli"  
  310.  
  311. data 11 "_door" 111 "_cuc" 130 "_cuc"
  312. set t @
  313. dload @thispath$"cam02.fli" d1 1 
  314. putdff d1 0 0 0 
  315. mark (d1->frames)-1
  316.  putdff d1 @playspeed @loop @loop
  317.  if @loop==@t                ;Reached frame 465
  318.   local t @                ;grab sfx
  319.   digpak preloaded @@t
  320.   digpak play 
  321.   set t @
  322.  endif
  323.   waitkey 0
  324.   getkey k name                       
  325.   if @k==return
  326.    set broken 1
  327.    break kohtzout
  328.   endif
  329. loop
  330. dfree d1
  331.  
  332. playit @thispath$"cam03.fli" 
  333.  
  334. dload @thispath$"cam04.fli" d1 1 
  335.  data 6 "_eyes" 16 "_eyes"
  336.  dataend
  337.  local x @
  338.  putdff d1 0 0 0 
  339.  mark (d1->frames)-1
  340.     putdff d1 @playspeed @loop @loop
  341.     if @loop==@x
  342.        local t @
  343.        digpak preloaded @@t
  344.        digpak play 
  345.        set x @
  346.     endif
  347.   waitkey 0
  348.   getkey k name                       
  349.   if @k==return
  350.    set broken 1
  351.    break kohtzout
  352.   endif
  353.  loop
  354. dfree d1
  355.  
  356. playit @thispath$"cam05.fli"
  357.  
  358. dload @thispath$"cam06.fli" d1 1 
  359.  data 327 "_chain" 362 "_chain" 383 "_chain"
  360.  dataend
  361.  local x @
  362.  putdff d1 0 0 0 
  363.  mark 402
  364.   putdff d1 @playspeed @loop @loop
  365.   if @loop==@x
  366.    local t @
  367.    digpak preloaded @@t
  368.    digpak play 
  369.    set x @
  370.   endif
  371.   waitkey 0
  372.   getkey k name                       
  373.   if @k==return
  374.    set broken 1
  375.    break kohtzout
  376.   endif
  377.  loop                    ;at frame 402 now
  378.  
  379. digpak preloaded @_c2                    
  380. digpak play 
  381.  
  382. mark 45                          ;from 402-447
  383.  putdff d1 @playspeed @loop+402 @loop+402
  384.  digpak done
  385.  if !@0
  386.   digpak play
  387.  endif
  388.  waitkey 0
  389.  getkey k name                       
  390.  if @k==return
  391.   set broken 1
  392.   break kohtzout
  393.  endif
  394. loop
  395.  
  396. mark (d1->frames)-447            ;this isn't playing
  397.  putdff d1 @playspeed @loop+447 @loop+447
  398.   waitkey 0
  399.   getkey k name                       
  400.   if @k==return
  401.   set broken 1
  402.   break kohtzout
  403.   endif
  404. loop
  405.  
  406. dload @thispath$"cam07.fli" d1 1 
  407. putdff d1 0 0 0 
  408. mark (d1->frames)-1
  409.  putdff d1 @playspeed @loop-1 @loop
  410.  if @loop==26
  411.   digpak preloaded @_bump
  412.   digpak play 
  413.  endif
  414.  waitkey 0
  415.  getkey k name                       
  416.  if @k==return
  417.   set broken 1
  418.   break kohtzout
  419.  endif
  420. loop
  421. dfree d1
  422. playit @thispath$"cam08a.fli" 
  423. digpak preloaded @_wink
  424. digpak play 
  425. playit @thispath$"cam08b.fli" 
  426. kohtzout:
  427. dfree d1
  428. free _BUMP _CHAIN _C2 _EYES _WINK
  429. return                                 ;end of camkohtz
  430.  
  431.  
  432.